def rabbit_pairs(months):
    if months == 1 or months == 2:
        return 1
    else:
        return rabbit_pairs(months-1) + rabbit_pairs(months-2)

months = int(input("请输入月份:\n"))

total = rabbit_pairs(months + 1)

print("{}月以后共有{}对兔子。".format(months, total))
